/*
 *  clb_error.h
 *  clbench
 *
 *  Created by Holmes Futrell on 12/16/09.
 *  Copyright 2009 __MyCompanyName__. All rights reserved.
 *
 */

#ifndef CLB_ERROR_H
#define CLB_ERROR_H

#include <OpenCL/opencl.h>
#include <stdio.h>
#include <stdlib.h>

const char *clb_err_to_string(cl_int err);

#define clb_check_error( err, s ) inner_clb_check_error( __FILE__, __LINE__, err, s )
#define clb_check_error_simple( err ) inner_clb_check_error( __FILE__, __LINE__, err, NULL )

cl_int inner_clb_check_error(const char *file, int line, cl_int err, const char *s);


void clbfatalError(const char *error);

#endif